﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HotelManager
{
    public class Minibar
    {
        public static List<MinibarProduct> OriginalProducts { get; set; }
        public List<MinibarProduct> AvailableProducts { get; set; }

        public Minibar()
        {

        }

        public List<MinibarProduct> Restock()
        {
            var needed =
                from p in OriginalProducts
                where !AvailableProducts.Contains(p)
                select p;

            return needed.ToList();
        }

        public decimal FindOutstandingBalance()
        {
            decimal price = 0;
            var needed =
                from p in OriginalProducts
                where !AvailableProducts.Contains(p)
                select p;

            foreach (var product in needed)
            {
                price += product.Info.Price;
            }

            return price;
        }
    }
}